package com.goktech.service.imp;

import com.goktech.entity.Book;
import com.goktech.mapper.BookMapper;
import com.goktech.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @ClassName bookServiceImp
 * @Description TODO
 * @Author 邱华英
 * @Date 2022/9/19 20:05
 * @Version 1.0
 */

@Service("BookService")
public class bookServiceImp implements BookService {

    @Autowired
    BookMapper bookMapper;
    @Override
    public int insertBook(Book b) {
        return bookMapper.insertBook(b);
    }

    @Override
    public int updateBook(Book b) {
        return bookMapper.updateBook(b);
    }

    @Override
    public int deleteBook(Book b) {
        return bookMapper.deleteBook(b);
    }

    @Override
    public Book findByBook(Book b) {
        return bookMapper.findByBookId(b);
    }

    @Override
    public List<Map<String, Object>> findByAll(int begin,int end) {
        return bookMapper.findByAll(begin,end);
    }

    @Override
    public List<Map<String, Object>> findLikeBookName(Book b) {

        return bookMapper.findLikeBookName(b);
    }

    @Override
    public List<Map<String, Object>> findLikeAuthor(Book b) {
        return bookMapper.findLikeAuthor(b);
    }

    @Override
    public Map<String, Object> findByMapOne(Book b) {
        return bookMapper.findByMapOne(b);
    }

    @Override
    public Book findByName(Book b) {
        return bookMapper.findByName(b);
    }

}
